import request from "@/common/Ask";
import type { Query } from "@/interface/Query";
import type { Page } from "@/interface/Page";
import type { Notice } from "@/interface/Notice";
export async function listApi( data : Query ) {
    return await request<Page<Notice>>({
        url : "/notice/list",
        method : "post",
        data : data
    });
}

export async function operatorApi( data : Notice ) {
    return await request<Notice>({
        url : "/notice/operator",
        method : "put",
        data : data
    });
}


export async function removeApi( ids : string[] ) {
    return await request<Notice>({
        url : "/notice/remove",
        method : "delete",
        data : ids
    });
}


export async function changeStatusApi( id : string , status : number) {
    return await request<Notice>({
        url : `/notice/changeStatus/${id}/${status}` ,
        method : "get"
    });
}

